<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('诊疗单列表')"/>
</head>
<body class="gray-bg">


<div class="container-div">
    <div class="row">



        <div class="col-sm-12 select-table ">
            <table id="bootstrap-table-mianyi-logs-status1" data-mobile-responsive="true"></table>
        </div>

            <a class="btn btn-success" onclick="askZhenLiao()">
                <i class="fa fa-plus"></i> 新增诊疗请求
            </a>
        </div>

    </div>
</div>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('system:ncZhenliaoLogs:edit')}]];
    var removeFlag = [[${@permission.hasPermi('system:ncZhenliaoLogs:remove')}]];
    var prefix = ctx + "system/ncZhenliaoLogs/chicken";


    $(function () {


        var optionsStatus1 = {
            id: "bootstrap-table-mianyi-logs-status1",
            url: prefix + "/list/2/1",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "诊疗单",
            showExport: true,
            striped: true,
            showSearch: true,
            showRefresh: true,
            showColumns: true,
            showToggle: true,
            toolbar: 'toolbar1',
            columns: [{
                checkbox: true
            },
                {
                    title: '序号',
                    formatter: function (value, row, index) {
                        return $.table.serialNumber(index);
                    }
                },
                {
                    field: 'zlId',
                    title: '诊疗单号',
                    visible: false
                },
                {
                    field: 'cowCode',
                    title: '耳号',
                    sortable: true,
                    visible: false

                },
                {
                    field: 'roomNum',
                    title: '鸡舍号',
                    sortable: true
                },
                {
                    field: 'ageDays',
                    title: '日龄',
                    sortable: true,
                    visible: false

                },
                {
                    field: 'illMuns',
                    title: '发病次数',
                    sortable: true
                },

                {
                    field: 'remark',
                    title: ' 备注',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.tooltip(value);
                    }
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function (value, row, index) {
                        var actions = [];
                        // actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)" onclick="confirmCheck(\'' + row.zlId + '\')"><i class="fa fa-send"></i>确认</a>');
                        return actions.join('');
                    }
                }]
        };


        $.table.init(optionsStatus1);

    });
    //新增诊疗单
    function addZhenLiaoLogs(name, url) {
        $.modal.openTab(name, url);
    }


    function askZhenLiao() {
        $.modal.open("添加", "/system/ncZhenliaoLogs/chicken/askZhenLiao");
    }


    //刷新页面
    function reload() {
        $.table.refresh();
    }

</script>
</body>
</html>